﻿using WeDonekRpc.Helper.Validate;

namespace Basic.FlowRemoteModel.NodeMsg.Model
{
    public class NodeMsgSet
    {
        [NumValidate("flow.id.error", 1)]
        public long FlowId
        {
            get;
            set;
        }
        [NumValidate("flow.node.id.error", 1)]
        public long NodeId
        {
            get;
            set;
        }
        [EnumValidate("flow.msg.type.error", typeof(FlowMsgType))]
        public FlowMsgType MsgType
        {
            get;
            set;
        }
        [EnumValidate("flow.msg.receive.range.error", typeof(FlowMsgReceiveRange))]
        public FlowMsgReceiveRange ReceiveRange
        {
            get;
            set;
        }

        [NumValidate("hr.company.id.error", 1)]
        public long? CompanyId
        {
            get;
            set;
        }
        [NumValidate("hr.unit.id.error", 1)]
        public long? UnitId
        {
            get;
            set;
        }
        [NumValidate("hr.dept.id.error", 1)]
        public long? DeptId
        {
            get;
            set;
        }
        [LenValidate("flow.node.msg.titile.code.len", 0, 5, false)]
        [LenValidate("hr.titile.code.len", 3, IsArray = true)]
        public string[] TitleCode
        {
            get;
            set;
        }
        [LenValidate("flow.node.msg.titile.code.len", 0, 5, false)]
        [LenValidate("hr.post.code.len", 2, 6, true)]
        public string[] PostCode
        {
            get;
            set;
        }
        [LenValidate("flow.node.msg.emp.len", 0, 5, false)]
        [NumValidate("hr.emp.id.error", 1, IsArray = true)]
        public long[] EmpId
        {
            get;
            set;
        }
        [LenValidate("flow.node.msg.node.len", 0, 5, false)]
        [NumValidate("flow.node.id.error", 1, IsArray = true)]
        public long[] ToNodeId
        {
            get;
            set;
        }
        [NumValidate("form.table.id.error", 1)]
        public long? TableId
        {
            get;
            set;
        }
        [NumValidate("form.column.id.error", 1)]
        public long? ColId
        {
            get;
            set;
        }
        /// <summary>
        /// 关键字
        /// </summary>
        [LenValidate("form.keywords.len", 0, 20)]
        public string Keywords { get; set; }

        [LenValidate("flow.node.msg.show.len", 0, 300)]
        public string Show { get; set; }
    }
}
